home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
tone.arc
/
TONEINIT.ASM
< prev
next >
Wrap
Assembly Source File
|
1985-11-26
|
896b
|
20 lines
; ROUTINE TO SET TONE;
; define control bit field parameters for the timer chip
sc = 2 ; use counter 2
rl = 3 ; mode to load period one byte
; at a time
mode = 3 ; square wave generator
bcd = 0 ; not bcd, use binary values;
; form control word
cnword = sc*40h + rl*10h + mode*2 + bcd
;
toneinit proc far;
push ax ; save registers
; send control word to 8253 timer chip
mov al,cnword ; select the above control word
out 43h,al ; send it out the control port
; pop ax ; restore registers
ret
;
toneinit endp